import { Input, Space } from "antd"
import { FC } from "react"

import { SFormItem } from "@/components/common"
import { useLocale } from "@/locales"

export type LockAccountSelectField = {
	handleAmountRebateCheck1: (e: any) => void
	handleAmountRebateCheck2: (e: any) => void
}

const LockAccountSelect: FC<LockAccountSelectField> = ({ handleAmountRebateCheck2, handleAmountRebateCheck1 }) => {
	const { formatMessage } = useLocale()

	return (
		<SFormItem label={formatMessage({ id: "funds.fund_audit.actual_revenue" })}>
			<Space.Compact>
				<SFormItem name="minIncomeAmount">
					<Input placeholder={formatMessage({ id: "common.minimum" })} onBlur={handleAmountRebateCheck1} type="number" />
				</SFormItem>
				<SFormItem name="maxIncomeAmount">
					<Input placeholder={formatMessage({ id: "common.maximum" })} onBlur={handleAmountRebateCheck2} type="number" />
				</SFormItem>
			</Space.Compact>
		</SFormItem>
	)
}

export default LockAccountSelect
